home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1993 July / InfoMagic USENET CD-ROM July 1993.ISO / sources / unix / volume24 / psroff3.0 / part14 < prev    next >
Encoding:
Internet Message Format  |  1991-10-09  |  56.3 KB

  1. Subject:  v24i109:  psroff, Troff to PostScript filter, Part14/19
  2. Newsgroups: comp.sources.unix
  3. Approved: rsalz@uunet.UU.NET
  4.  
  5. Submitted-by: Chris Lewis <clewis@ferret.ocunix.on.ca>
  6. Posting-number: Volume 24, Issue 109
  7. Archive-name: psroff3.o/part14
  8.  
  9. #! /bin/sh
  10. # This is a shell archive.  Remove anything before this line, then feed it
  11. # into a shell via "sh file" or similar.  To overwrite existing files,
  12. # type "sh file -c".
  13. # The tool that generated this appeared in the comp.sources.unix newsgroup;
  14. # send mail to comp-sources-unix@uunet.uu.net if you want that tool.
  15. # Contents:  fonts.lj/R.10.pk.UU fonts.lj/S.10.pk.UU opt.c pkc.c
  16. #   psroff.S utils/fonts/cmtt10.pk.UU utils/pk2ditwid.c utils/pktype.c
  17. #   widths/gfnttab.S
  18. # Wrapped by clewis@ecicrl on Fri Apr  5 20:56:03 1991
  19. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  20. echo If this archive is complete, you will see the following message:
  21. echo '          "shar: End of archive 14 (of 19)."'
  22. if test -f 'fonts.lj/R.10.pk.UU' -a "${1}" != "-c" ; then 
  23.   echo shar: Will not clobber existing file \"'fonts.lj/R.10.pk.UU'\"
  24. else
  25.   echo shar: Extracting \"'fonts.lj/R.10.pk.UU'\" \(6323 characters\)
  26.   sed "s/^X//" >'fonts.lj/R.10.pk.UU' <<'END_OF_FILE'
  27. Xtable
  28. X !"#$%&'()*+,-./0123456789:;<=>?
  29. X@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_
  30. Xbegin 644 fonts.lj/R.10.pk
  31. XM]UD``*``````````!":N``0FKM@.J0```!4&!_L<\S0S0U)1X`ZH````%08'
  32. XM]QP<<\YS"`#@#[,````?"`?U'3Q"@8&!0CS`$2$````,!![\'1(=_L$MDA@2
  33. XM$.`<(@```!4-#/\<8&>'OC[0T("$!"`B`A`1`1`1`0"P/",````C'B7^',+B
  34. XM)RQC8\;B)RQC8\;C)RQC8XT!TN*B<L8V/&XR<JTAT(-CQN(G+&-CQN(G+&-C
  35. XMQN(G+"#01B0````5$"'^'H\<:",2)204$R45$A86-A1?839A0A-1=$&&$9B9
  36. XMB9BA%9$SD4,244?T%545-Q42%A42%A04%1,6(Q(9;?%PP&\E````(QXA_AY$
  37. XMTR<C'1-B4K-C8X1B<2MC@9)S@8-S@7.#@7*3@6.3@6*C@5.R<5/#85+1)14]
  38. XM(C%3U$8F34-2,=(U)1T24V'#4G&S4X&B8X&38X&2<X&#<X%S@X%RDX%CHG%C
  39. XMLV%BT"46/1(Q<M-$P$XF````(!L?_AV#VB(=CR0=;C-!UO,QUS(=@Q':2)8[
  40. XM23PJ/!H1.QD2.AD4.!DD.!CR8V&#<T&3=#&3@R&CE*2CH1.4@3*!(W%"4D-"
  41. XM=85`X!`G````#`4,_!QGOM"$(A$1`-`C*````!`**OT>D8&!@8)_)_)_)S?B
  42. XM)^LXXB@X\I\I\I*1H:&AV",I````$`HJ_AX:&AH9*?*?*?*#CB*.L^)R<W\G
  43. XM\G\G*!@8&!G0(BH````5$!+^'GXR@5)1%#(T(R(C:*]*AC(B,D,C014E&.,G
  44. XMT`\K````(!L<_A?>PL`X[-+`X`XL````#`0,_`-O]Q$1(DC("2T````."P(`
  45. XM"=G@"BX````,!`3\`V_VT"XO````%1`I_AX!#RT_TM/2T]\M/?+3WRT]\M/2
  46. XMT]\M/?+3WRT]\M/2T]\M/?(!`-`D,````!40'?X;9*)"<F)?*",X,O*B'L.C
  47. XM\2HB.#/R@E)B<D*64-`2,0```!4-'/P;8J-V4C.N`7.53=`O,@```!40'/X;
  48. XM59)288,QHC&C%(EY^#$Y/$_#SSP\/2TM+2TH%"D3*A,:$](!`0$1T#`S````
  49. XM%1`=_AM6@E)O&#-&0D<R1D,V3//2TM*F`1(!'S`0/?03B>)X@R&308-24I90
  50. XMP"XT````%1(<_QO/+2/1]-`1/"$\$CL3.B,Z%#D5."4X%C<7-B<V1-"DT
  51. XMU>:SN]`N-0```!40'?X;(H)+6FB.40$1-7$A0F$18E)S09/3WB02F.*%LR&4
  52. XM(9-!<V)#E6#0-S8````5$!W^&X2B0G)A8F-"9#)T,H(_/2TS53(4)#$6(T@B
  53. XM2#$Z(>0Z/Q*C$Y(R@S*"4F)R0J50P"<W````%1$=_AL1T]/QTB'!+QP3&QTO
  54. XM'2'2+2'2\M$]'RT>,]#E31*0T#0X````%1`=_AMEDD)Q@5&20:(N(J(CDB1R
  55. XM15%7$GBGF&(V0E8BA"*6M>/"$K$BH4*"4U&64-`W.0```!40'?X;9*)"<F)2
  56. XM@C.",I,?.B'D.C$J,3A"*$,F$30D$C53/]+3,H(T<C1B0W%A<F)"I7"P#SH`
  57. XM```,!!+\$1(8$MXA@2&P%3L````,!!K\$1(8$MXA@3XS'R$A(3#`$;@````,
  58. XM!![\%!(8$MGL(=\2$,`0/0```"`;#/X/'<'>#+WAW!#0(;D````4#QW^%&+/
  59. XM3"!;\=XQTM'2PL.SL\XCAY,2H3)R9T#0'S\````4#QW^'$=B8S&3$Y?B@\+#
  60. XMLL+"T=+>406BSTPGP%)`````(!L=_ARGU2<M$K*QTAD=07'6%1A8%!8T%Q,6
  61. XM-A<2%B@T$A4X-!$6*34N13DU)BDU$14X-1$6*#02%C9$$Q8T$B,4&%1&'>'>
  62. XM'>+22"ELI\`R00```!\<'?\<T.(MSB3:XA%-CB$TUN(534\732)UT1E-'1T"
  63. XME<\;2RM:\=!)+05TQ4E\R#%"````'1@<_AO5I(2$HW2D9+-N-+14LV2D9)1T
  64. XM=8TI24=*1DM%3#7D3$]$M%2D9)0]9<`Z0P```!X9'OX<MGD)RHB)3T$0]
  65. XM(S/3,SU"(]4O%-81/77GV3UQ\4UA(]8?,]05/2%ST!HK'#<M-W#(,T0````@
  66. XM&QS^&]702$M*24PX]-`W31-DT47TTC7G323T32-4T45-$V301DT#=,.$LY23
  67. XM?5G8-T4````<&!S^&P&&2D9,)O319-)?0!`51A<5XD8=12V]12WB1AU&&!1`
  68. XM$1XD0!`5]-)4PF2D(!@@V"A&````&Q8<_AL!=4E%2R7TP53"]$T41A8>)$8;
  69. XM12N[12OC1AOF0!1=V<!!1P```"$<'OX<MG&S8D*BHB*#T$<](V/3-CU"4]4D
  70. XM]-84/7$^5-M,T]-4/41/3313TT;STD<]%(/!$Z*A,K-B4=%KR!-(````'QH<
  71. XM_AO"SK1*2-6.Q*1,+,@,20````\,'/\;SMQ$3-`:2@```!40'?\;/87.`41#
  72. XM5#XE1#1$46-Q0Y6`R$9+````(!P<_AO&E4Q(3"I,&TL<2AT$D=%('21QTT8=
  73. XM1%'51#U$-=-"$4TT(23201--)531]'302$Q(6TE+]*2DM)2UA+8\6\@=3```
  74. XM`!H5'/X;T,73[234XDP?1+)$L52B5)-4=1UQR#U-````)B$<_AN=*?1=)8XA
  75. XM%-`12/$DL22.(321-(XA1'%$CB%4452.(60Q9(\701=(XAA(2!DI1S@I1)4E
  76. XMP,A&3@```!\:'/X;B91;-UP8$4L8\22A@321@36!@42!CQ5'&!9&&/%T48&$
  77. XM08&%,8&4,8\:0A@;01CQQ8\=!('1.!TB<]$DG!3`.T\````@&Q[^'*?5-3T3
  78. XMD[.SD]`W/2-4TD0]0S]-1"/6,>=-9!/6,O340SU#1-)%/2-ST#D[.SD]$U/5
  79. XM>L@B4````!P7'/X;U*2#A)1DI%2S7D2T1+-4I%249(.-"NM-++#`4%$````@
  80. XM&R7^'*?5-3T3D[.SD]`W/2-4TD0]0S]-1"/6,>=-9!/6,O340SU#1&-D4U$Q
  81. XM4W,Q43.3(6$3LQ%DT40W&I<=0G'5)2U3,_U8UVV4,,@X4@```!\<'?X;T]-'
  82. XM3024M*2DLZXTM)2SI*2DE+1TT,TT9-%(/02$SE24OTE&%$HV%$I$$<<T'94@
  83. XMP#A3````%Q(>_AQ644-2(C*1$B.C(L(3PAXCT!%-%=%=":N,BZG07171323B
  84. XMT5_0(3LB(1H3(B8D%77`(%0````>&QS_&QW".$<R*4@B\:21$J2BXK2A[3Q-
  85. XMEM/34,@?50```!\:'?X;Q91,-^UDT!D\&DL;.AT"H=$H'3-"UEK(-58````?
  86. XM'!W_&[F#711DTB=-(870*?30&^)+'0])'16!TO1QTU4M3T4=;B0QV/01V6VO
  87. XM3<XBT,A(5P```"LH'?\;M;6#6UI%3$PGXDM;&4I:&O21))&T@22!ST<41QQ6
  88. XM%$<=#B119%'2XD,80QU$(841U?01I!'66EU^),38XBT2L,!$6````!\<'/\;
  89. XM&TIFA:2BT$DM!8'21QTU4M1%'60QUU$MA!':3;7;3;]=D237$UUA1-4573)E
  90. XMTAA-$97"I,'$HL5UISILR#)9````'QX<`!O)E%T4A-(:70*TT!Q;'16ATDD=
  91. XM-8'41QU54M9%'80QV5(=I!';;<ZDV<G`.%H````9%!S^&QUA65$[0O*T,;1!
  92. XMI4&D493332327232]-)-)=))'U2A1+$UHC2Q-,$TLB2S%94=8;@,6P````P'
  93. XM*?P>Q.V%PK@,70````P'*0`>PNV%Q.`/7@```!4*!?L;#`2"$0*`0.`08```
  94. XM``P%#/T<"(B$0A"WWF#`*F$````5$A+^$3>B4W139&-B<]+SMX0S8V-3<U*#
  95. XM3B.#,1)T,2)1(Q%&0R#(*6(````7$QW_'&T^D],S6#$D)T<F.24Y-#HDY3HS
  96. XM.B0Y-#DE1R8B%2<45M`?8P```!(.$OX15G)"4D0R5"-B,KY3PL.1(I$R<5)"
  97. XM=4#`*60````7$QW^'*;3Z3E2-R41-B=%*30Y-"HSY3HT*C0Y-2DV)T<D(3A3
  98. XM8-`A90```!(/$O\198)"8F)"@B.#$J6@%N/2TZ$BH3*!4E*%0,`89@````T/
  99. XM'0`<A9(R8S121$-27E.+CM(YI,`V9P```!42'/\2T3=#$B0D,R,T,Q0F)^,V
  100. XM-R8H-#DD*1)+'3+4+3J-!=$RHR+%XM$A+",J)38XA<@;:````!<4'?\<;4Z3
  101. XMU#-9,A0W,18G1S;L.#.2D)`1:0````P)'?\<,F]&+99NI3.0@!AJ````#0LE
  102. XM`QR"CT@ME^FH,25T(4,R)"14R#!K````%A,=_QQM/I/3-(0V1C8H-ADU&C0;
  103. XM,QPR.S%+0CHS230Y-$@U.#8W-D8V4I*`R`QL````#`D=_QQF[=,YV!]M````
  104. XM)"$2_Q%C9FDR%3,5-S$7(A<G2$@V[#DY,Y.3D-@7;@```!<4$O\18UDR%#<Q
  105. XM%B='-NPX,Y*0T")O````%1(2_Q%FHT-R@E*B,Z,BPAY3PQ+"(Z,RHE*"<T.F
  106. XM8-@G<````!<3&O\18U@Q)"=')CDE.30Z).4Z/S.30Y)4<F,14G,EGF/9H-`I
  107. XM<0```!83&OX19%%R0B)B<1)2A$\Y,^4Z-"HT.34H1B=')"$X4S`2YCV0V!5R
  108. XM````$`T2_Q%B-3$2)/0D,T).LWHPT")S````$`T2_Q$V(3)3(8(?*1$X$5F&
  109. XMEHEI2D^5@1(14B$V,-`9=````!`,&O\97C&O*3A&M.@YY#44)10S%T+8%G4`
  110. XM```7%!+_$65F[#@V-T<G1S0A.5-@R"!V````%A,2_Q&%8D@U\Y%_-QGB-1OS
  111. XM,<02T/,1TN(]09#(.7<````>&Q+_$8*"<D9&-3<W)3<W%C81)Q?S41-1@T$R
  112. XM49\S$S,:,A4C&_,14Q'$<A'0\W/1*2TAD8#`+'@````6%1(`$1@X5&.$8J-A
  113. XMPT'1,ATC$M--4]5--=,2/1%#P5.R8Z&#=&4X2<@L>0```!83&O\1A6)(-?.1
  114. XM?S<9XC4;\S'$$M#S$=+B/4\=3QI$&D,;0BPB+130T"AZ````$@X2_Q$=$V,B
  115. XM<R%S,60Q8T%3I*.CI%%#83-Q)&(C<2.!(V,=$,@)]@```!44`0`+U^`/K```
  116. XM`!4.!/T;'`3\)#\@..`.JP```!4,!/P<8&\/\/8&T!#^````(!L<_AK>PL`X
  117. XMZM+`.,!4T@```"`;'/X7I]4G+1*RL=(9'4%QU!$5'4$Q0=,4$QTQ82'2%Q$=
  118. XM(9+1&BT!LOP<*QT"H=$I'2$1<=(2%ATQ,4'3%!,=05$1U!<=09'2&RLM$G+5
  119. XM>L`??@```"`;"?X.5=,3C2$KT!%%2UA86T5!'0LATH,=-5#`3/L````J)1S^
  120. XM%]HJ+82$UDA-<Y/72$UDA-9(37.3UTA-9(362$USD]=(36](3:2$VCD]I(3:
  121. XM2$VDA-HY/:2$VDA-I(3:.3VDA-I(3:*BR$S]````*B4<_A<J+:2$VDA-HY/:
  122. XM2$VDA-I(3:.3VDA-I(3:2$VCD]I(3:](362$USD]=(362$UDA-<Y/72$UDA-
  123. XM9(37.3UTA-9(38*BVM`[O0```!(+)?T<-5)!,U$B9?5F$3DI.2HI-R(D,R,D
  124. XM,34AXC4Q)3$T(R,T(B<Y*BDY*3$6;U5B(5,Q0E4PF`E?````%14#`/?5B`E\
  125. XM````#`(I^Q[9&`K\````&105_A0/(,`K/````"`9&/T5V3UTUDUDUDUDUDUD
  126. XMUDUDUDUO3:3:3:3:3:3:3:3:3:3:3:/(*SX````@&1C]%3VDVDVDVDVDVDVD
  127. XMVDVDVDVO3636363636363636363637/9R"Q<````%1`I_A[RTN(M+B+2XBTN
  128. XM(M+RTN(M+B+2XBTO+2XBTN(M+B+2XBTBTA#0&WL````5#BG]'J2#H[*^P[*S
  129. XMDX33T\+.P\+#P]38&WT````5#BG]'DT]/"SL/"P\/4@Z.ROL.RLY.$K`-[L`
  130. XM```@&1W\'-1=8D'3-AT3<=$I'#D<-SLW/#@=#SV.(]6]3C/8XSU'H5FA0D6!
  131. X,45=#43,XA'6`]?;V
  132. X`
  133. Xend
  134. END_OF_FILE
  135.   if test 6323 -ne `wc -c <'fonts.lj/R.10.pk.UU'`; then
  136.     echo shar: \"'fonts.lj/R.10.pk.UU'\" unpacked with wrong size!
  137.   fi
  138.   # end of 'fonts.lj/R.10.pk.UU'
  139. fi
  140. if test -f 'fonts.lj/S.10.pk.UU' -a "${1}" != "-c" ; then 
  141.   echo shar: Will not clobber existing file \"'fonts.lj/S.10.pk.UU'\"
  142. else
  143.   echo shar: Extracting \"'fonts.lj/S.10.pk.UU'\" \(5603 characters\)
  144.   sed "s/^X//" >'fonts.lj/S.10.pk.UU' <<'END_OF_FILE'
  145. Xtable
  146. X !"#$%&'()*+,-./0123456789:;<=>?
  147. X@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_
  148. Xbegin 644 fonts.lj/S.10.pk
  149. XM]UD``*``````````!":N``0FKL!#(0```"`?*?X>`1$!`OWRW_+?XBW_+?\M
  150. XM_RW_+?\M\M`M$L/1*TT"L2/"H3.RTSHM/SDM7S<M?S4MGB,RV_,2W?3?\M7`
  151. XM1B0````J)1+^$5;2:9M#)R58*!491BH3&T0=`2'$(M`1'1,2TB_233+]--(M
  152. XM(A/1$1T"),$AT!1+$QHF2148*%4G(TN9;290P!8E````(!P6_A3$VO;:0*<"
  153. XML*=-KVVDP-`S)@```"`;$OX15=0YE$)4<GG&C,H&S$H'&CQU)\0$$@=:!
  154. XMPA.!LC-RDE-Q@G1B-)95U-@M*@```"`3%/H3(!%=,3LS.34W-S4Y,SLQ/5`1
  155. XM\P$5TQ.S,Y-3<W-3DS.S$]4!$J@)+0```"`9`OT*U\`K/````"`9&/T5V3UT
  156. XMUDUDUDUDUDUDUDUDUDUO3:3:3:3:3:3:3:3:3:3:3:/(*ST````@&1C]%3VD
  157. XMVDVDVDVDVDVDVDVDVDVO3636363636363636363637/9R!M#````&A4<_AO7
  158. XM5(14HE]+%4LN)$P>TT347-"`P$1$````(QX=_AS1\M[TW&VQ%-H279$TV!1=
  159. XM<536%EU1=-0873&4TAI=$;30'%P=!+'16ATDD=-8'41QU58=9%\=A#WQ`O#`
  160. XM1D@````@&Q[^'*?5-3T3D[.SD]`W/2-4TD0]0S]-1"/6,4UH,;$XXCT#@QL3
  161. XMC]9!/6,O340SU#1-)%/2-ST#D[.SD]$U/5>@P#%+````'1H=_QS.(MKB38;7
  162. XM\136$EU?$TU"-=/Q5-(E71XA=-#B&4OB&TD=!(+$=*8Y7)@:3@```!P7'/X;
  163. XMW..K'?\:,8XJ6/&C$";C&KW`R`]0````'QH<_AO=[<1*1,+`R$%2````'AD<
  164. XM_AO;)-%272,UTB1-,472)%TA5-(571%EV$V%V$V?39+:':':'2%QTQ8=06'3
  165. XM)1U"0=0D'4,QTU+:';'0'E,````/#Q;_$8=B4D+"PM'?+.(]/%MJ>FM-\\+1
  166. XMLV#`*%0````@&QW^'#6U6(<Z:2)35$(2<S-SDR."DR*1LA/8;87:[339;4T6
  167. XMP#I5````'AD<_AMM'2;7XDU9T3)!.C1#-S5$-39%,T9%0>5'1D%&14,V134U
  168. XM1#<T0SHR03T9UN)-=M+14,`R5P```"`;'/X;?1U&V>)+5T9?)&147F141'-4
  169. XM1']$0TDT0SLS0DPR0CT3%]5]GB39;4T6P#Q8````'AD=_AR7TD5+.3@]`U30
  170. XM1#TC--)"/4,>1-1!/4,O320STC7ST#<[.?*R45*24O89%A$5)R42XH>!R#59
  171. XM````(QX=_AL"\=\_/9%?/7%_/5&?/3&_/1'0\\'2\Z'4\X'6\V'8-!V4,=HR
  172. XM';01W/3>\M'00EH````6%!_^':720K&!D9*"DF2"9(-BHN(!0H8S8U$C4H$3
  173. XM0I$3,K0CLS+#(\,CLR\\,CPC.S,[)/.B8I*"<J)"U;"@,%P````@&2+]&;PK
  174. XMI+A+A+A+A+A+A+A+A+A+A+D[Q+Q+Q+Q+Q+Q+Q+Q+Q+Q+Q+P@A->H+UX````@
  175. XM&2+]&2O$O$O$O$O$O$O$O$O$O$O$O#N4N$N$N$N$N$N$N$N$N$N$NB";UY@)
  176. XM7P```!45`P#WU<`P80```!L6$OX1A-,D+#8F$S<U$C@T$RDT$O.4(2\[,1,[
  177. XM1.([-BI&*"$S$R4D(A97,\!(8@```!<7)?\<TETR0M$7+!@K&3D:.!LX&C@;
  178. XM.!LI&C@5B104*Q5Z&RCQPH\<-N(<-QLW*S<K*!$9*1$8*1,D.A5<\=CC'8\=
  179. XMD,`M8P```!44&_\15*$WD2EQ*V$B<E$BD4$QH4'2\2'3XA$=3RU>(=7B+4XR
  180. XMU/+5&M`R9````!(/'?X<E9)!<6%BSB+3Q,3$M9(48S-34S-C,H(O."'SD2."
  181. XM+S@3-R0G%287)!E7T!AE````$0T2_A%V4Y*BHZ*CJ3Y#ORPL)"94P#9F````
  182. XM$A$E_QR^(=-J)!D221TATATBT2TATBT?+2'2XBT3T?+2XCTCT4T6R+?&T4T?
  183. XM/1*B,=`VP"YG````%1(;_A$C93$C(D(A,A%C$3-T-'0S@_0X/C,X,^,X,S@U
  184. XM*#TO/1XST?/2)L`Y:````!,0'?X<E+(BDD)R4F)B4V)2<D-S,H/R.",H,O.#
  185. XM+1'B.#(X(S<S*#,G-/)R4F)B4H)"@C&TH-`8:0````\*$OX14GXC;C-N(V-_
  186. XM-4]1(C)$0-`L:@```!@3$OX14H-39D-1)$-!0D-!LS'#$M0!"I-3CS8VXC<T
  187. XM$3<S$3DC$BI"P#-K````&!,=_AQ4U#U//333XCU.(]--/STTTSTDT6PB.R,Z
  188. XM)$@F-S8V-S4X0SHR.S$\02T#P"IL````&14;_Q%RDGXC@VXS@VXS@VXC@S$T
  189. XM9#$E0B(A,Q533SU.,]3SU2U@T"=M````%1,2_A$6HN)#D_,Y-#@U."4X-3<V
  190. XM-R<V)S8H-2DS.C(K;4`1P#1N````$A$E`!R^(=-H1!<R1ST#T.4](A:308(6
  191. XM<=(M$M(=+RT>(](]%=![BXQM!='RH4'$4-`D;P```!01$OX1A:)"<V)3@D*2
  192. XM,J(O.FXJ,?.3(X-"@E)R<D.E@,`J<````!@5$OX134/5+5(E%!@6%!<7$RT?
  193. XM%"T/)"T!4L\D.S0[)3KS8Y)R<,`Q<0```!43&_\1M-`S*B8H)R<W)R@_4X/B
  194. XM0X-3@E.#4X)C<G12<Q%"@R2O/2XSTO/3+4#`)W(````8%1+^$7T6TDTT1$DG
  195. XM.#@G\Y)N(Y-CDG.#<X*#<J)BPD+170#`'W,````2$Q+^$4TCTRTR)2H6*1<=
  196. XM4=3B+3XBT^(](]0LT"=T````%A,2_A$SL3$C@Q$S@Q$SD_0Z'T.QXC.Q3SH5
  197. XM*A8X%S<9-1QGP#]U````&10E_AS2'5XQU>,=7QTVPR$B@S%#4E%20F%3(V%B
  198. XM\3877W%F87;V%C(F%3,E%34D%"@R$CMM/C'5XQT`P$%V````&A8:_Q$TT1(3
  199. XM.Q,32A@Y&3@:1APU'0-!T4,=(R'3,1U$UO/53573$CTA,]$4/0%4OQ<Z&$@:
  200. XM-!(<,A(=%##`2'<````;%R7^'-3QV.,=CC'8&S@6$Q(V%3$3-A4Q$S47/T-1
  201. XM@4-A@4-1D>(S88%#48%347%C46%S45&205&S(3+1?6'8XQV.(='`,'@````:
  202. XM%Q(`$4'3%/'3/R'5(1UQ$:&1$9*2^B@1&2@A&2@2*"<B)D8CUT@95S=U5'"(
  203. XM"7D````,`BG['MG0&WH````5#BG]'J2#H[*^P[*SDX33T\+.P\+#P]38&WL`
  204. XM```5#BG]'DT]/"SL/"P\/4@Z.ROL.RLY.$K`(7P````@&Q/^$E73$XTA*]`1
  205. XM14M86%M%01T+(=*#'34-`"D8#7T````@&Q3^$U3;5-M4R"Q^````%1`I_A[R
  206. XMTN(M+B+2XBTN(M+RTN(M+B+2XBTO+2XBTN(M+B+2XBTBTA#`1G\````@'!_^
  207. XM'56%B4E34R-3,W9S(I22$Y25XK*TXMM=D_$MDB/7,SU34M4F/3-ST3D\.SH]
  208. XM`X/2-CU#0]8R/8(BV6VDW/+0P!NA````%0XE_1QQSRM)$2$7$B(4(R,A%24>
  209. XMWV)@@!JB````*B4._A"D&L\:P:P:P3T:@:H:H:KQJA?0&Z,````5#B7]'&X!
  210. XMXF%241(R,D$B(7$2$92_+1:0&J0````J)`[]$&&X\;@;@;@;?>(;H;H;KQNA
  211. XML\@JI@```!42%/\3+331;"([(TDE1R=%*30J0O+&I"*30G125'(TDB.VQ-$M
  212. XM,,`JJ````!42%/\3TRT4QK,BE#)T4E1R0Y(DIOPB2B0Y)4<G12E#*S(L;133
  213. XM()@)L````!45`P`?U<@:M0```!P7&OX8[5+674,2U"(](S/0-5=8T-!XP!JV
  214. XM````'!<:_AB'T-"%=5/0,STC(M0A/47M76+`*K<````<%1K]%IQ]%4TSU#U#
  215. XMU2U3U2U3U?+6`?_6/6+6/6+6/6/6/636T9S`*;H````@&1K]%ITWU537/8/8
  216. XM/9+9/9+9/9Y2VCVBVCVBVCVCVCVDVM6=,,@INP```"`9&OT6TYU=I-H]H]H]
  217. XMHMH]HMH^7:+9/9+9/9+9/8/8/71=5].0P"R^````(!DB_1F=-]54USV#V#V2
  218. XMV3V2V3V>0MH]HMH]HMH]H]H]I-K5G3"C_;#(++\````@&2+]&=.=7:3:/:/:
  219. XM/:+:/:+:/DVBV3V2V3V2V3V#V#UT75?3"K_;$*@,R````!P7"_X.T^BZ(,`5
  220. XMS````!40$/X15HI</]$04_'1/%J&4+!6S0```"HE)_X=PWS\'*5UQDP4PSQ3
  221. XMP3QSL\DY/+-SS38L\E//-"T2,]$R\M,A/37FU5TS\2TR(]$S+1)#SS4L\F/-
  222. XM-SRSD\D[/'/!/%/#3!3&5URL'/?#T!O.````$@TF_AQAOE.^(7,A(QT3(2-_
  223. XM&^`2.^46P"7/````$@TE_AQAOC._%Q04$=WB8;XSL=P;XSOB%MT104%_&^,[
  224. XM%L`KU0```!$1)_X=P]`B&R,J(CHC&N0M'D/1+1YCT2T>0]'D*A,J,BHC*Q(M
  225. XM`\#0/-@````5$"/^'[\I02<D-B4U\F0S5BXB8B(34R;B4C9#-N)"1C-&XC)6
  226. XM(U8B8_$B)B)E,_1B4U)C0G(4GRO`:=D````J)2?^'=&=W0V4E-5-!-(]0]`M
  227. XM@K+:*2W"?RWB7R`0(RT8DB+"8X(BLF2"$K)TE*."I*+83ED]@A*2UR(I.A@B
  228. XM*BH8(RHH&"0K)2DE+%HF+>)RW"DMHK+8+0/4/2303524V=#=G1"X#=H````9
  229. XM%!7^%-[L3$W@F`O@````)0PI\!W7ZY>8#.$````E#"GP'^N5?2#`&>(````E
  230. XM#2GP';*4A(2$A(6$CTA82.)7[<6`T!OC````)0XK^1^>U864E85UA6:#MK6E
  231. XMM:6DI:[5R!CD````)0TI\!_MQ9XEE)6?2DE92DI*2DL@F`SP````)0TI^!W7
  232. XMZYA0D`OQ````)0TI^!^.N=S(&?(````E#BGY'2Q+2TM+2TM*6DI:2N):2NVU
  233. XMV!OS````)0TK\!_M65E)65E:6EHX5E975UA(5^U8P!KT````)0XI^1^>VUE)
  234. XMXEE)64E924E)24E)2BS8"O4````E!2OP'PV0N`GV````*BD!``O=L"G[````
  235. XM*B48_A7!\M;RUBUBUL^=%CU3TTTTUTUSV"V#U]&<^RV"V/+8\LH8"OP````9
  236. XM%!7^%`\@L"G]````*B48_A7*\MCRV"V"O/G1V#USV$UTTTU#U2U3?1G/UBUB
  237. X<UO+6\L'0$/X````@&QS^&M["P#CJTL`X]?;V]CUS
  238. X`
  239. Xend
  240. END_OF_FILE
  241.   if test 5603 -ne `wc -c <'fonts.lj/S.10.pk.UU'`; then
  242.     echo shar: \"'fonts.lj/S.10.pk.UU'\" unpacked with wrong size!
  243.   fi
  244.   # end of 'fonts.lj/S.10.pk.UU'
  245. fi
  246. if test -f 'opt.c' -a "${1}" != "-c" ; then 
  247.   echo shar: Will not clobber existing file \"'opt.c'\"
  248. else
  249.   echo shar: Extracting \"'opt.c'\" \(6281 characters\)
  250.   sed "s/^X//" >'opt.c' <<'END_OF_FILE'
  251. X/*
  252. X    Copyright 1985, 1986, 1987, 1988, 1989, 1990, 1991 Chris Lewis
  253. X        All Rights Reserved
  254. X
  255. X    See the LICENSE file for a full description of restrictions under which
  256. X    this software is provided.
  257. X
  258. X    Function:        Optimizer module
  259. X */
  260. X
  261. X#include "defs.h"
  262. X
  263. Xint specXPos, specYPos;
  264. Xextern struct cattab tabN[], tabS[];
  265. X
  266. X#ifdef    OPT
  267. X#ifndef    lint
  268. Xstatic char SCCSid[] =
  269. X    "@(#)opt.c: 2.4 Copyright 91/02/20 09:02:37 Chris Lewis";
  270. X#endif
  271. X
  272. Xstruct insbuf {
  273. X    char font, points, nc;
  274. X    short xpos, ypos;
  275. X};
  276. X
  277. X#define    INSBUFSIZ    200
  278. X#define    OPTSIZ    100
  279. Xstruct insbuf insbuf[INSBUFSIZ];
  280. Xstatic struct insbuf *insptr = insbuf;
  281. Xstatic int insypos = -1;
  282. X
  283. Xcanoninsert(xpos, ypos, font, points, nc)
  284. Xregister int xpos, ypos;
  285. Xregister int font, points, nc; {
  286. X    DBP((D_CAT, "canoninsert: %d %d %d %d %d\n", xpos, ypos, font, points,
  287. X    nc));
  288. X
  289. X    if (insypos != ypos || (insptr - insbuf >= INSBUFSIZ - 2)) {
  290. X    canonflush();
  291. X    insypos = ypos;
  292. X    }
  293. X    insptr->font = font;
  294. X    insptr->points = points;
  295. X    insptr->nc = nc;
  296. X    insptr->xpos = xpos;
  297. X    insptr++;
  298. X}
  299. X
  300. X#ifdef    SORT
  301. Xint xsortorder;
  302. X
  303. Xxsort(a, b)
  304. Xregister struct insbuf *a, *b; {
  305. X    int ret;
  306. X    if (a->xpos < b->xpos)
  307. X    ret = -1;
  308. X    else if (a->xpos > b->xpos)
  309. X    ret = 1;
  310. X    else
  311. X    ret = 0;
  312. X    return(xsortorder * ret);
  313. X}
  314. X#endif
  315. X
  316. Xcanonflush() {
  317. X    register struct insbuf *ip;
  318. X    insptr--;
  319. X    DBP((D_CAT, "canonflush: start: %d chars\n", insptr - insbuf + 1));
  320. X
  321. X    if (insptr < insbuf) {
  322. X    insptr = insbuf;
  323. X    return;
  324. X    }
  325. X
  326. X    if (insptr->xpos < insbuf[0].xpos) {
  327. X    DBP((D_CAT, "canonflush: BACK (%d chars)\n", insptr - insbuf + 1));
  328. X#ifdef    SORT
  329. X    xsortorder = -1;
  330. X    insdump(insbuf, insptr);
  331. X    qsort(insbuf, insptr - insbuf + 1, sizeof(struct insbuf), xsort);
  332. X    insdump(insbuf, insptr);
  333. X#endif
  334. X    for(ip = insptr;ip >= insbuf; ip--)
  335. X        canonchar(ip->xpos, insypos, ip->font, ip->points, ip->nc);
  336. X    } else {
  337. X    DBP((D_CAT, "canonflush: FORW (%d chars)\n", insptr - insbuf + 1));
  338. X#ifdef    SORT
  339. X    xsortorder = 1;
  340. Xinsdump(insbuf, insptr);
  341. X    qsort(insbuf, insptr - insbuf + 1, sizeof(struct insbuf), xsort);
  342. Xinsdump(insbuf, insptr);
  343. X#endif
  344. X    for(ip = insbuf;ip <= insptr; ip++)
  345. X        canonchar(ip->xpos, insypos, ip->font, ip->points, ip->nc);
  346. X    }
  347. X    insptr = insbuf;
  348. X    optflush();
  349. X}
  350. X
  351. Xcanonchar(xpos, ypos, font, points, nc)
  352. Xregister int xpos, ypos;
  353. Xregister int font, points, nc; {
  354. X    static struct insbuf lastchar;
  355. X    static short lastypos;
  356. X    static sstate = 0;
  357. X    static char sbuf[512];
  358. X    register char *p;
  359. X#ifdef    INSPECIAL
  360. X    /* Inline special directives, not supported yet */
  361. X    switch(sstate) {
  362. X    case 0:
  363. X        if (font == symidx && nc == 34) {
  364. X        sstate = 1;
  365. X        lastchar.xpos = specXPos = xpos;
  366. X        lastchar.font = font;
  367. X        lastchar.points = points;
  368. X        lastchar.nc = nc;
  369. X        lastypos = specYPos = ypos;
  370. X        optflush();
  371. X        return;
  372. X        }
  373. X        break;
  374. X    case 1:
  375. X        if (font == symidx && nc == 34) {
  376. X        if (xpos == lastchar.xpos && ypos == lastypos) {
  377. X            sstate++;
  378. X            sbuf[0] = '\0';
  379. X            return;
  380. X        } else {
  381. X            lastchar.xpos = xpos;
  382. X            lastypos = ypos;
  383. X            /* stay in this state */
  384. X        }
  385. X        } else
  386. X        sstate = 0;
  387. X
  388. X        if (be->beputchar)
  389. X        (*be->beputchar)(lastchar.xpos, lastypos, lastchar.font,
  390. X            lastchar.points, lastchar.nc, (char *) NULL);
  391. X        break;
  392. X    case 2:
  393. X        if (nc == 34 && font == symidx) {
  394. X        DBP((D_CAT, "Special inline sequence: %s\n", sbuf));
  395. X        dospecial(sbuf);
  396. X        sstate = 0;
  397. X        return;
  398. X        }
  399. X        if (strlen(sbuf) > sizeof(sbuf) - 1) {
  400. X        fprintf(stderr,
  401. X            "%s: unterminated/too long \\(bs\\(bstr\\(bs\n",
  402. X            progname);
  403. X        sstate = 0;
  404. X        return;
  405. X        }
  406. X        if (font == symidx)
  407. X        p = tabS[nc].ch_name;
  408. X        else
  409. X        p = tabN[nc].ch_name;
  410. X        if (strlen(p) >= 2) {
  411. X        if (strcmp(p, "hy") == 0 ||
  412. X            strcmp(p, "mi") == 0 ||
  413. X            strcmp(p, "\\-") == 0)
  414. X            p = "-";
  415. X        else if (strcmp(p, "ff") == 0 ||
  416. X             strcmp(p, "fi") == 0 ||
  417. X             strcmp(p, "fl") == 0)
  418. X            ;
  419. X        else if (strcmp(p, "Fi") == 0)
  420. X            p = "ffi";
  421. X        else if (strcmp(p, "Fl") == 0)
  422. X            p = "ffl";
  423. X        else
  424. X            p = " ";
  425. X        }
  426. X        strcat(sbuf, p);
  427. X        return;
  428. X    }
  429. X#endif
  430. X    optinsert(xpos, ypos, font, points, nc);
  431. X}
  432. X
  433. Xint optxpos, optypos;
  434. Xint optfont, optpoints, optnc, origxpos;
  435. Xchar optbuffer[OPTSIZ];
  436. Xchar *optp = optbuffer;
  437. X
  438. Xoptflush() {
  439. X
  440. X    if (!optimize)
  441. X    return;
  442. X
  443. X    if (optbuffer[0] && be->beputchar)
  444. X    (*be->beputchar)(origxpos, optypos, optfont, optpoints, optnc,
  445. X        optbuffer);
  446. X    optbuffer[0] = '\0';
  447. X    optp = optbuffer;
  448. X}
  449. X
  450. Xoptinsert(xpos, ypos, font, points, nc)
  451. Xint font, points, nc;
  452. Xint xpos, ypos; {
  453. X    struct troff2befont *bp;
  454. X    static char *wp;
  455. X    extern struct cattab tabN[], tabS[];
  456. X    struct cattab *ct;
  457. X    register char *from;
  458. X    int cantcache;
  459. X
  460. X    if (!optimize) {
  461. X    if (be->beputchar)
  462. X        (*be->beputchar)(xpos, ypos, font, points, nc, (char *) NULL);
  463. X    return;
  464. X    }
  465. X
  466. X    DBP((D_CHAR, "OLD: x,y,f,p,c = %d,%d,%d,%d,%d\n",
  467. X    optxpos, optypos, optfont, optpoints, optnc));
  468. X    DBP((D_CHAR, "NEW: x,y,f,p,c = %d,%d,%d,%d,%d\n",
  469. X    xpos, ypos, font, points, nc));
  470. X
  471. X    /* the 10 is to ensure that there's enough room for moderately
  472. X       long multiple-character sequences */
  473. X
  474. X    if (ypos != optypos || optfont != font || optpoints != points ||
  475. X    wp != xlatetable[font]->widthtable ||
  476. X    optp > optbuffer + OPTSIZ - 10)
  477. X    optflush();
  478. X
  479. X    wp = xlatetable[font]->widthtable;
  480. X
  481. X    if (font == symidx) {
  482. X    bp = &be->besymfont[nc];
  483. X    ct = &tabS[nc];
  484. X    } else {
  485. X    bp = &be->bestdfont[nc];
  486. X    ct = &tabN[nc];
  487. X    }
  488. X
  489. X    cantcache = !wp || (int) wp == 1 || (font == symidx ? bp->t2b_font != S:
  490. X                 bp->t2b_font != N);
  491. X
  492. X    if (bp->t2b_xc || bp->t2b_yc || bp->t2b_scale || cantcache)
  493. X    optflush();
  494. X
  495. X    if (optxpos != xpos)    /* handle spaces one day... */
  496. X    optflush();
  497. X
  498. X    if (!optbuffer[0]) {
  499. X    optypos = ypos;
  500. X    optxpos = xpos;
  501. X    origxpos = xpos;
  502. X    optfont = font;
  503. X    optnc = nc;
  504. X    optpoints = points;
  505. X    }
  506. X
  507. X    if (cantcache) {
  508. X    if (be->beputchar)
  509. X        (*be->beputchar)(xpos, ypos, font, points, nc, (char *) NULL);
  510. X    return;
  511. X    }
  512. X
  513. X    optxpos += ((wp[ct->ch_wididx]) * points + 3) / 6;
  514. X    DBP((D_CAT, "optxpos: %d\n", optxpos));
  515. X
  516. X    for (from = bp->t2b_charseq; *from;)
  517. X    *optp++ = *from++;
  518. X    *optp = '\0';
  519. X}
  520. X#endif
  521. X
  522. X#ifdef    SORT
  523. Xinsdump(b, p)
  524. Xregister struct insbuf *b, *p; {
  525. X    if (!(debug&D_VERB))
  526. X    return;
  527. X    DBP((D_VERB, "insdump:\n"));
  528. X    for(; b <= p; b++)
  529. X    DBP((D_VERB, "%d %d\n", b->xpos, b->nc));
  530. X}
  531. X#endif
  532. END_OF_FILE
  533.   if test 6281 -ne `wc -c <'opt.c'`; then
  534.     echo shar: \"'opt.c'\" unpacked with wrong size!
  535.   fi
  536.   # end of 'opt.c'
  537. fi
  538. if test -f 'pkc.c' -a "${1}" != "-c" ; then 
  539.   echo shar: Will not clobber existing file \"'pkc.c'\"
  540. else
  541.   echo shar: Extracting \"'pkc.c'\" \(5715 characters\)
  542.   sed "s/^X//" >'pkc.c' <<'END_OF_FILE'
  543. X/*
  544. X    Copyright 1985, 1986, 1987, 1988, 1989, 1990, 1991 Chris Lewis
  545. X        All Rights Reserved
  546. X
  547. X    See the LICENSE file for a full description of restrictions under which
  548. X    this software is provided.
  549. X
  550. X    Function:        PK Cache - handles incremental downloading for
  551. X            laserjets
  552. X
  553. X*/
  554. X
  555. X#include "defs.h"
  556. X
  557. X#if    defined(PARTIAL) || defined(INCR)
  558. X
  559. X#ifndef    lint
  560. Xstatic char SCCSid[] =
  561. X    "@(#)pkc.c: 2.2 Copyright 91/02/20 09:06:57 Chris Lewis";
  562. X#endif
  563. X
  564. X#include "pk.h"
  565. X
  566. X#include "pkc.h"
  567. X
  568. Xextern int fontCount;
  569. X
  570. X/*    Does the font *need* this character? */
  571. Xextern struct needmaps *needmaps;
  572. X
  573. Xneedchar(font, ch)
  574. Xregister int font;
  575. Xregister long ch; {
  576. X    register struct needmaps *nbp;
  577. X
  578. X    ch &= 0xff;
  579. X
  580. X    if (ch <= ' ' || (ch > 0x7f && ch <= (0x80 + ' ')))
  581. X    return(0);
  582. X    ch -= ' ';
  583. X    if (ch >= 0x80 - ' ')
  584. X    ch -= ' ';
  585. X
  586. X    if (font >= 0 && font <= 2)    /* redirections to NORM fonts */
  587. X    font = N;
  588. X    else if (font == 3)        /* redirections to SYMBOL font */
  589. X    font = S;
  590. X
  591. X    for (nbp = needmaps; nbp; nbp = nbp->next)
  592. X    if (nbp->fontnum == font) {
  593. X        return(nbp->NMAP(ch / ELEN) & (1 << (ch % ELEN)));
  594. X    }
  595. X    return(0);
  596. X}
  597. X
  598. X
  599. Xaddneedchar(font, ch)
  600. Xregister int font, ch; {
  601. X    register struct needmaps *nbp, *onbp = (struct needmaps *) NULL;
  602. X    ch &= 0xff;
  603. X
  604. X    if (ch <= ' ' || (ch > 0x7f && ch <= (0x80 + ' ')))
  605. X    return;
  606. X    ch -= ' ';
  607. X    if (ch >= 0x80 - ' ')
  608. X    ch -= ' ';
  609. X
  610. X    if (font >= 0 && font <= 2)    /* redirections to NORM fonts */
  611. X    font = N;
  612. X    else if (font == 3)        /* redirections to SYMBOL font */
  613. X    font = S;
  614. X
  615. X    for (onbp = (struct needmaps *) NULL, nbp = needmaps;
  616. X    nbp; onbp = nbp, nbp = nbp->next)
  617. X
  618. X    if (nbp->fontnum == font)
  619. X        break;
  620. X
  621. X    if (!nbp) {
  622. X    nbp = (struct needmaps *) mustmalloc(sizeof(struct needmaps),
  623. X        "needmaps");
  624. X    nbp->fontnum = font;
  625. X    if (!onbp)
  626. X        needmaps = nbp;
  627. X    else
  628. X        onbp->next = nbp;
  629. X    }
  630. X    if (ch == -1)
  631. X    return;
  632. X    nbp->NMAP(ch / ELEN) |= (1 << (ch % ELEN));
  633. X}
  634. X
  635. X#endif
  636. X
  637. X#ifdef    INCR
  638. Xdownchar(font, ch, pointidx)
  639. Xint font, ch, pointidx; {
  640. X    ch &= 0xff;
  641. X    if (ch <= ' ' || (ch > 0x7f && ch <= (0x80 + ' ')))
  642. X    return(0);
  643. X    ch -= ' ';
  644. X    if (ch >= 0x80 - ' ')
  645. X    ch -= ' ';
  646. X    return(fonttable[font].map->DMAP(ch / ELEN, pointidx) &
  647. X    (1 << (ch % ELEN)));
  648. X}
  649. X
  650. Xsetdown(font, ch, pointidx)
  651. Xint font, ch, pointidx; {
  652. X    ch &= 0xff;
  653. X    if (ch <= ' ' || (ch > 0x7f && ch <= (0x80 + ' ')))
  654. X    return;
  655. X    ch -= ' ';
  656. X    if (ch >= 0x80 - ' ')
  657. X    ch -= ' ';
  658. X    fonttable[font].map->DMAP(ch / ELEN, pointidx) |= (1 << (ch % ELEN));
  659. X    fonttable[font].map->lastpage[pointidx] = currentPage;
  660. X}
  661. X#endif
  662. X
  663. X#if    defined(DEBUG) && defined(PARTIAL)
  664. Xdumppartmaps() {
  665. X    register struct needmaps *nbp;
  666. X    register int c;
  667. X    fprintf(diagFile,"MASKLEN: %d, ELEN: %d\n", MASKLEN, ELEN);
  668. X    for (nbp = needmaps; nbp; nbp = nbp->next) {
  669. X    fprintf(diagFile,"Font: %02x, needmap:", nbp->fontnum);
  670. X    for (c = 0; c < MASKLEN; c++)
  671. X        fprintf(diagFile," %08x", nbp->NMAP(c));
  672. X    fprintf(diagFile,"\n");
  673. X    }
  674. X}
  675. X
  676. X#ifdef    INCR
  677. Xdumpincrmaps() {
  678. X    static char ptsizes[] =
  679. X     {6, 7, 8, 9, 10, 11, 12, 14, 16, 18, 20, 22, 24, 28, 36};
  680. X    register struct downmaps *dbp;
  681. X    register int c, p, fn;
  682. X    fprintf(diagFile,"MASKLEN: %d, ELEN: %d\n", MASKLEN, ELEN);
  683. X    for (fn = 0; fonttable[fn].troffName; fn++) {
  684. X    dbp = fonttable[fn].map;
  685. X    if (!dbp)
  686. X        continue;
  687. X    fprintf(diagFile,"Font: %02x, troffname: %s, downloadedmaps:\n",
  688. X        fn, fonttable[fn].troffName);
  689. X    for (p = 0; p < NPTSIZE; p++) {
  690. X        if (!dbp->nm[p])
  691. X        continue;
  692. X        fprintf(diagFile,"f%02d p%02d:%02d lp%d %s:", fn, p,
  693. X        ptsizes[p], dbp->lastpage[p], dbp->pkfont[p] ? "load": "unlo");
  694. X        for (c = 0; c < MASKLEN; c++)
  695. X        fprintf(diagFile," %08x", dbp->DMAP(c,p));
  696. X        fprintf(diagFile,"\n");
  697. X    }
  698. X    }
  699. X}
  700. X#endif
  701. X
  702. Xdumpmaps(which)
  703. Xint which; {
  704. X    DBP((D_FONT,"dumpmaps: %d\n", which));
  705. X    if (diagFile && (debug&D_FONT)) {
  706. X    switch(which) {
  707. X        case 0: dumppartmaps(); break;
  708. X#ifdef    INCR
  709. X        case 1: dumpincrmaps(); break;
  710. X#endif
  711. X    }
  712. X    }
  713. X}
  714. X
  715. X#endif
  716. X
  717. X#ifdef    INCR
  718. X/*    Go find "oldest" font and delete it, both internally *and*
  719. X    on the printer.  It cannot already be in use on this page.
  720. X */
  721. Xpkflush(needfont, needpoint)
  722. Xint needfont, needpoint; {
  723. X    register int oldestpage = 32767, p;
  724. X    int bestpoints, bestfont;
  725. X    register struct downmaps *dbp;
  726. X    int font;
  727. X
  728. X    DBP((D_FONT, "Flushing font - avoid font %d, ps: %d\n",
  729. X    needfont, needpoint));
  730. X
  731. X    for (font = 0; fonttable[font].troffName; font++) {
  732. X
  733. X    if (!(dbp = fonttable[font].map))
  734. X        continue;
  735. X
  736. X    for (p = 0; p < NPTSIZE; p++) {
  737. X        if (!dbp->pkfont[p] || (font == needfont && needpoint == p))
  738. X        continue;
  739. X
  740. X        /* if font in use, and less than oldest page */
  741. X        DBP((D_FONT, "Checking font %d, point: %d, lastpage: %d\n",
  742. X        font, p, dbp->lastpage[p]));
  743. X
  744. X        if (dbp->lastpage[p] && dbp->lastpage[p] < oldestpage) {
  745. X        oldestpage = dbp->lastpage[p];
  746. X        bestpoints = p;
  747. X        bestfont = font;
  748. X        }
  749. X    }
  750. X    }
  751. X
  752. X    /* oh-oh! */
  753. X    if (oldestpage >= currentPage) {
  754. X
  755. X    fprintf(stderr, "Too many fonts on page %d, SIMPLIFY!\n", currentPage);
  756. X
  757. X    } else {
  758. X    dbp = fonttable[bestfont].map;
  759. X
  760. X    DBP((D_FONT, "Dismembering font %d, pointidx: %d, p: %x\n", bestfont,
  761. X        bestpoints, dbp->pkfont[bestpoints]));
  762. X
  763. X    /* Clobber PK */
  764. X    pk_destroy(dbp->pkfont[bestpoints]);
  765. X
  766. X    /* Clobber PK pointer */
  767. X    dbp->pkfont[bestpoints] = (struct pkp *) NULL;
  768. X
  769. X    /* clear downloaded arrays */
  770. X    clrarray((char*) &dbp->DMAP(0,bestpoints), MASKLEN * sizeof(ETYP));
  771. X
  772. X    /* reset lastpage */
  773. X    dbp->lastpage[bestpoints] = 0;
  774. X
  775. X    /* tell backend that this font isn't downloaded anymore */
  776. X    fonttable[bestfont].fontFlags[bestpoints] =
  777. X        tolower(fonttable[bestfont].fontFlags[bestpoints]);
  778. X
  779. X    fontCount--;
  780. X    /* Select and nuke downloaded font */
  781. X    printf("\033*c%dd2F", (bestfont << 4) + bestpoints);
  782. X    }
  783. X}
  784. X#endif
  785. END_OF_FILE
  786.   if test 5715 -ne `wc -c <'pkc.c'`; then
  787.     echo shar: \"'pkc.c'\" unpacked with wrong size!
  788.   fi
  789.   # end of 'pkc.c'
  790. fi
  791. if test -f 'psroff.S' -a "${1}" != "-c" ; then 
  792.   echo shar: Will not clobber existing file \"'psroff.S'\"
  793. else
  794.   echo shar: Extracting \"'psroff.S'\" \(5952 characters\)
  795.   sed "s/^X//" >'psroff.S' <<'END_OF_FILE'
  796. X%%STARTSHELL%%
  797. X#    Copyright 1985, 1986, 1987, 1988, 1989, 1990, 1991 Chris Lewis
  798. X#        All Rights Reserved
  799. X#
  800. X#    See the LICENSE file for a full description of the restrictions
  801. X#    under which this software is provided.
  802. X#
  803. X#    Specs:        troff2ps driver
  804. X#
  805. X#ident  "@(#)psroff.sh: 2.15 Copyright 91/03/26 00:13:16 Chris Lewis"
  806. X
  807. XLIBDIR="%%LIBDIR%%"
  808. XFONTDIR="%%FONTDIR%%"
  809. X
  810. Xterm=false
  811. Xfail=false
  812. Xif [ -n "$PSROFF" ]
  813. Xthen
  814. X    type=$PSROFF
  815. Xelse
  816. X    type=`basename $0 | sed -n -e 's;^\([^/]*\)roff$;\1;p'`
  817. X    if [ -z "$type" ]
  818. X    then
  819. X    echo "psroff: Can't intuit psroff type from $0" >&2
  820. X    echo "or set PSROFF environment variable" >&2
  821. X    exit 1
  822. X    fi
  823. Xfi
  824. Xcopies=1
  825. Xfor i in $*
  826. Xdo
  827. X    case $i in
  828. X    -F)
  829. X        fail=true
  830. X        ;;
  831. X    -X)
  832. X        set -x
  833. X        debug=1
  834. X        ;;
  835. X    -V)
  836. X        version=1
  837. X        ;;
  838. X    -t)
  839. X        term=true
  840. X        ;;
  841. X    -T*)
  842. X        type=`echo $i | sed -e 's/-T//'`
  843. X        ;;
  844. X    -d*)
  845. X        sptr=`echo $i | sed -e 's/-d//'`
  846. X        ;;
  847. X    -n*)
  848. X        copies=`echo $i | sed -e 's/-n//'`
  849. X        ;;
  850. X    -D* | -M | -R* | -O* | -P* | -Z)
  851. X        extraargs="$extraargs $i"
  852. X        ;;
  853. X    -m* | -c*)
  854. X        macros="$macros `echo $i | sed -e 's/-[cm]//'`"
  855. X        ;;
  856. X    -)
  857. X        files="$files $i"
  858. X        ;;
  859. X    -rL*)
  860. X        eval `echo $i | sed -e 's/-rL\(..*\)\(.\)$/length=\1 prec=\2/'`
  861. X        if [ -z "$length" -o -z "$prec" ]
  862. X        then
  863. X        echo "$0: Bad length definition ($i) - must have value and scale" \
  864. X            >&2
  865. X        exit 1
  866. X        fi
  867. X        extraargs="$extraargs -l$length$prec"
  868. X        args="$args $i"
  869. X        ;;
  870. X    -*)
  871. X        args="$args $i"
  872. X        ;;
  873. X    *)
  874. X        files="$files $i"
  875. X        if [ ! -r $i ]
  876. X        then
  877. X        echo "$0: cannot open $i" >&2
  878. X        exit 1
  879. X        fi
  880. X        ;;
  881. X    esac
  882. Xdone
  883. X
  884. Xif [ -z "$files" ]
  885. Xthen
  886. X    files="-"
  887. Xfi
  888. X
  889. X#    Find some pieces:
  890. Xif [ -f troff2ps ]
  891. Xthen
  892. X    t2=./troff2ps
  893. Xelse
  894. X    t2=$LIBDIR/troff2ps
  895. Xfi
  896. Xif [ -n "$version" ]
  897. Xthen
  898. X    exec $t2 -V
  899. Xfi
  900. X
  901. Xif [ -r psrofflib ]
  902. Xthen
  903. X    psrofflib=psrofflib
  904. Xelif [ -r lib/psrofflib ]
  905. Xthen
  906. X    psrofflib=lib/psrofflib
  907. Xelse
  908. X    if [ -r $LIBDIR/lib/psrofflib ]
  909. X    then
  910. X    psrofflib=$LIBDIR/lib/psrofflib
  911. X    fi
  912. Xfi
  913. X
  914. Xif [ -z "$psrofflib" ]
  915. Xthen
  916. X    echo "$0: Can't find psrofflib in ., lib, or $LIBDIR/lib" >&2
  917. X    exit 1
  918. Xfi
  919. X
  920. XF=''
  921. X#    If your system has no awk (or a busted one), you may have to
  922. X#    comment out the "line=`awk ... $psrofflib" lines, and uncomment
  923. X#    the sed script.  If you do, you won't be able to continue
  924. X#    psrofflib lines, so you'll have to "join" the entries in psrofflib
  925. X#    (remembering to delete the name fields in the continuation lines).
  926. Xline=`awk '
  927. X    $1 ~ /^#/ {next}
  928. X    $0 ~ /^troff/ { print $0 }
  929. X    $1 == "'$type'" {
  930. X    seen=1
  931. X    print "F='T'" substr($0, length($1) + 1)
  932. X    next
  933. X    }
  934. X    { if (seen) exit(0) }
  935. X' $psrofflib`
  936. X#line=`sed -n -e '/^troff/p' \
  937. X#         -e "/^$type[     ]/{
  938. X#         s/^$type[     ]*\(.*\)$/F='T' \1/p
  939. X#         q
  940. X#        }" $psrofflib`
  941. X
  942. Xif [ -z "$line" ]
  943. Xthen
  944. X    echo "$0: Can't find a line for '$type' in $psrofflib" >&2
  945. X    exit 1
  946. Xelse
  947. X    eval "$line"
  948. X    if [ -z "$F" ]
  949. X    then
  950. X    echo "$0: Can't find a line for '$type' in $psrofflib" >&2
  951. X    exit 1
  952. X    fi
  953. Xfi
  954. X
  955. X#    If -N in t2arg, then this is ditroff.
  956. Xif [ -n "`echo "$t2arg" | sed -n -e '/-N/p'`" ]
  957. Xthen
  958. X    otroff=
  959. X    widtharg="-T$width"
  960. Xelse
  961. X    otroff=-t
  962. Xfi
  963. X
  964. X#    Try to find troff
  965. Xif [ -z "$troff" ]
  966. Xthen
  967. X    #    Use path instead
  968. X    troff=troff
  969. Xelse
  970. X    if [ ! -f $troff ]
  971. X    then
  972. X    echo "$0: $troff: not executable" >&2
  973. X    exit 1
  974. X    fi
  975. Xfi
  976. X
  977. X#    Sanity checking for width tables
  978. Xif [ -n "$otroff" ]
  979. Xthen
  980. X    if [ -z "$trofftype" ]
  981. X    then
  982. X    widtharg=''
  983. X    else
  984. X    if [ ! -d $FONTDIR/$width ]
  985. X    then
  986. X        echo "$0: Warning: widths not installed" >&2
  987. Xcat >&2 <<!
  988. XCAT Troff width tables have not been installed in $FONTDIR/$width/ft\*.
  989. XEither you've not installed psroff yet, or your 'width' setting in psrofflib
  990. Xis incorrect.  Continuing anyways, using the default CAT troff widths found
  991. Xin $FONTDIR/ft\*, but the character spacing may be somewhat strange.
  992. XYou should investigate your configuration (see the README and TROUBLE files).
  993. X!
  994. X        widtharg=''
  995. X    else
  996. X        widtharg=`eval echo $trofftype`
  997. X    fi
  998. X    fi
  999. Xelse
  1000. X    if [ ! -d $FONTDIR/dev$width ]
  1001. X    then
  1002. X    echo "$0: Ditroff widths not installed!  Aborting" >&2
  1003. X    exit 1
  1004. X    fi
  1005. Xfi
  1006. X
  1007. Xif [ -z "$t2arg" ]
  1008. Xthen
  1009. X    echo "$0: t2arg isn't set for $type" >&2
  1010. X    exit 1
  1011. Xfi
  1012. X
  1013. Xt2arg="$t2arg $extraargs"
  1014. X
  1015. X#    command line -d option overrides ptr in psrofflib.
  1016. Xif [ -n "$sptr" ]
  1017. Xthen
  1018. X    ptr=$sptr
  1019. Xfi
  1020. X
  1021. Xif [ -n "$debug" ]
  1022. Xthen
  1023. X    (
  1024. X    echo "troff=$troff"
  1025. X    echo "trofftype=$trofftype"
  1026. X    echo "width=$width"
  1027. X    echo "t2arg=$t2arg"
  1028. X    echo "lparg=$lparg"
  1029. X    echo "widtharg=$widtharg"
  1030. X    echo "ptr=$ptr"
  1031. X    echo "files=$files"
  1032. X    echo "args=$args"
  1033. X    echo "otroff=$otroff"
  1034. X    echo "$troff $otroff $widtharg $args $files"
  1035. X    ) >&2
  1036. Xfi
  1037. X
  1038. X#    Handle macro business
  1039. Xml=''
  1040. Xfor i in $macros
  1041. Xdo
  1042. X    if [ -z "$otroff" ]
  1043. X    then
  1044. X    ml="$ml -m$i"
  1045. X    else
  1046. X    mac="$LIBDIR/adapters/mac.$type/tmac.$i"
  1047. X    if [ ! -r $mac ]
  1048. X    then
  1049. X        mac="$LIBDIR/adapters/tmac.$i"
  1050. X    fi
  1051. X    if [ ! -r $mac ]
  1052. X    then
  1053. X        mac="%%T2DIR%%/tmac.$i"
  1054. X    fi
  1055. X    if [ ! -r $mac ]
  1056. X    then
  1057. X        mac="%%RTMACDIR%%/tmac.$i"
  1058. X    fi
  1059. X    if [ ! -r $mac ]
  1060. X    then
  1061. X        echo "$0: Couldn't find tmac.$i anywhere!" >&2
  1062. X        exit 1
  1063. X    fi
  1064. X    ml="$ml $mac"
  1065. X    fi
  1066. Xdone
  1067. X
  1068. Xif [ -z "$ml" -a -n "$otroff" -a -r $LIBDIR/adapters/cmn.pre ]
  1069. Xthen
  1070. X    ml=$LIBDIR/adapters/cmn.pre
  1071. Xfi
  1072. X
  1073. Xif [ -z "$otroff" -a -r $LIBDIR/adapters/cmn.dit ]
  1074. Xthen
  1075. X    ml="$ml $LIBDIR/adapters/cmn.dit"
  1076. Xfi
  1077. X
  1078. X#    Okay, let's DO it!
  1079. X
  1080. Xif $fail
  1081. Xthen
  1082. X    $troff $otroff $widtharg $args $ml $files > /dev/null
  1083. X    rc=$?
  1084. Xelif $term
  1085. Xthen
  1086. X    if [ -n "$otroff" ]
  1087. X    then
  1088. X    ( $troff $otroff $widtharg $args $ml $files 2>&1 ) | $t2 $t2arg
  1089. X    rc=$?
  1090. X    else
  1091. X    $troff $widtharg $args $ml $files | $t2 $t2arg
  1092. X    rc=$?
  1093. X    fi
  1094. Xelse
  1095. X    if [ -n "$otroff" ]
  1096. X    then
  1097. X    if [ -n "$v" ]
  1098. X    then
  1099. X        eval "( cat $files | %%LIBDIR%%/catconv |
  1100. X        $troff $otroff $widtharg $args $ml - 2>&1 ) | $t2 $t2arg $lparg"
  1101. X        rc=$?
  1102. X    else
  1103. X        eval "( $troff $otroff $widtharg $args $ml $files 2>&1 ) |
  1104. X        $t2 $t2arg $lparg"
  1105. X    fi
  1106. X    rc=$?
  1107. X    else
  1108. X    eval "$troff $widtharg $args $ml $files 2>&1 | $t2 $t2arg $lparg"
  1109. X    rc=$?
  1110. X    fi
  1111. Xfi
  1112. Xexit $rc
  1113. END_OF_FILE
  1114.   if test 5952 -ne `wc -c <'psroff.S'`; then
  1115.     echo shar: \"'psroff.S'\" unpacked with wrong size!
  1116.   fi
  1117.   # end of 'psroff.S'
  1118. fi
  1119. if test -f 'utils/fonts/cmtt10.pk.UU' -a "${1}" != "-c" ; then 
  1120.   echo shar: Will not clobber existing file \"'utils/fonts/cmtt10.pk.UU'\"
  1121. else
  1122.   echo shar: Extracting \"'utils/fonts/cmtt10.pk.UU'\" \(6254 characters\)
  1123.   sed "s/^X//" >'utils/fonts/cmtt10.pk.UU' <<'END_OF_FILE'
  1124. Xtable
  1125. X !"#$%&'()*+,-./0123456789:;<=>?
  1126. X@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_
  1127. Xbegin 644 utils/fonts/cmtt10.pk
  1128. XM]UD11T9T;U!+(#$N,B!O=71P=70`H```W^H\>``$)JX`!":NT"9!"&9B%A,9
  1129. XM_QB#`1]0$/(2WB,3PC*^0S.?-3C[?6XC<T<W&#@7-Q#`+$((9F(6$AG_&!Q=
  1130. XM)-)39%-T3B.#0W1#<UT%_&-54X-#A.,SDS.$,W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F(6$1G^
  1178. XM&#-31C8C$Q,3'S,A(V0T/M)SOBE`P"(("&9B%A$9_AA.*;XSQXM-(D(R0>(T
  1179. XM-#%",D+22X?.,[XI0-`D"0AF8A81&?X83BF_."0T9#1S,TY!,S,S,C(T03%%
  1180. XMMYI=XSOBE-`E"@AF8A83&?\8=<F;=%14=$.3/E.S/B.37S<WXC4T\R,S*_.!
  1181. XM='#0)#`(9F(6$1G^&&6I>V0T4W,T="\Y,><[>4\3DR1T-%14-&MYI6#0%C$(
  1182. XM9F(6#AG\&'*_.DE6A98R.^TVPM'!T"@R"&9B%A$9_AA6FE`0-%84A!28^C\!
  1183. XM`]33U,3$Q,2UM,3$<R2#$",0$L`I,PAF8A81&?X85IM-$T921T)(/1/0]+5Y
  1184. XMB)G132/13]%Z>8DQ5E+13(9@T"<T"&9B%A,9_QB5UM(3PQ._,CHS.4,Y-#A$
  1185. XM-T4W-C9&-4<U`[Y+/.*QP"0U"&9B%A$9_A@N+03F/1,6?%T$1D,I/131,2MZ
  1186. XM>8A!5E+16I9@T"XV"&9B%A$9_AB%J6Q%1#54-&0D@C/4U"=#&R`1)70?27M_
  1187. XMHQ.C%(04=#153&FE8-@;-PAF8A81&OX9,!`#B4$X33T]33WSWB/>,]YCD-`I
  1188. XM.`AF8A81&?X85XM=-544E^*S$Y,E54N'BU14,Y,4E^*WE!.3)54]6X=0T"XY
  1189. XM"&9B%A$9_AAEJ6Q%5#1T%),3HQ\Z>W^4%'4@$2L31S/4TS*$)',T9#1%3&FE
  1190. XM@,`V)`AF8A81(/X<@M'B/'BUT243)!0S-^)#.#-")".)J:FHDR2#..(S1D,X
  1191. XM,S04(Q4]!;AM#STB<,`Y)@AF8A83&?\88])L>T(ZXC,Z,S%C,C)C,4)D8S=3
  1192. XM.$0W139C-G,V,C(U,W8T9O-4,R,V(RU#<F5&,]`>/PAF8A8/&?T81VL]%'CX
  1193. XM,2A)65E96DOC/"!++/3"<-`?#PAF8A8/&?T/8L],($LM.TOSOTI)6D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XM$Q#8#"`(9F(6$1#^">TM`F#P#VED96YT:69I97(@0TU45/`@8V]D:6YG<V-H
  1226. XM96UE(%1E6"!T>7!E=W)I=&5R('1E>'3P#&9O;G1F86-E8GET9?0`Z@``]?;V
  1227. X!]FUE
  1228. X`
  1229. Xend
  1230. END_OF_FILE
  1231.   if test 6254 -ne `wc -c <'utils/fonts/cmtt10.pk.UU'`; then
  1232.     echo shar: \"'utils/fonts/cmtt10.pk.UU'\" unpacked with wrong size!
  1233.   fi
  1234.   # end of 'utils/fonts/cmtt10.pk.UU'
  1235. fi
  1236. if test -f 'utils/pk2ditwid.c' -a "${1}" != "-c" ; then 
  1237.   echo shar: Will not clobber existing file \"'utils/pk2ditwid.c'\"
  1238. else
  1239.   echo shar: Extracting \"'utils/pk2ditwid.c'\" \(5768 characters\)
  1240.   sed "s/^X//" >'utils/pk2ditwid.c' <<'END_OF_FILE'
  1241. X/*
  1242. X    Copyright 1985, 1986, 1987, 1988, 1989, 1990, 1991 Chris Lewis
  1243. X        All Rights Reserved
  1244. X
  1245. X    See the LICENSE file for a full description of restrictions under which
  1246. X    this software is provided.
  1247. X
  1248. X    Function:        Generates ditroff width tables from PK's
  1249. X */
  1250. X
  1251. X#ifndef    lint
  1252. Xstatic char SCCSID[] =
  1253. X    "@(#)pk2ditwid.c 2.3 Copyright 91/02/20 09:09:45 Chris Lewis";
  1254. X#endif
  1255. X
  1256. X#include "defs.h"
  1257. X#include "pk.h"
  1258. X
  1259. X/*    Dummied out for pk.c */
  1260. Xneedchar(a, b)
  1261. Xint a, b; {
  1262. X    return(1);
  1263. X}
  1264. X
  1265. Xextern struct cattab tabN[], tabS[];
  1266. Xextern struct enctab encNormal[], encSymbol[];
  1267. X
  1268. Xint silent = 0;
  1269. Xint symbol = 0;
  1270. Xint allflag = 0;
  1271. X
  1272. XFILE *fout = NULL;
  1273. Xchar *progname;
  1274. X
  1275. X#define    UNITWIDTH    10
  1276. X
  1277. Xmain(argc, argv)
  1278. Xint argc;
  1279. Xchar **argv; {
  1280. X    char buf[512];
  1281. X    extern int optind;
  1282. X    extern char *optarg;
  1283. X    int c;
  1284. X    register int i;
  1285. X    struct enctab *et;
  1286. X
  1287. X    progname = argv[0];
  1288. X    while((c = getopt(argc, argv, "AD:sS")) != EOF) {
  1289. X    switch(c) {
  1290. X        case 's':
  1291. X        silent = 1;
  1292. X        break;
  1293. X        case 'A':
  1294. X        allflag = 1;
  1295. X        silent = 1;    /* Doesn't use ditroff encoding anyways */
  1296. X        break;
  1297. X        case 'S':
  1298. X        symbol = 1;
  1299. X        break;
  1300. X        case 'D':
  1301. X#ifdef    DEBUG
  1302. X        setdebug(optarg, "pk2dw.diag");
  1303. X        break;
  1304. X#else
  1305. X        fprintf(stderr, "%s: DEBUG disabled - recompile\n",
  1306. X            progname);
  1307. X        exit(1);
  1308. X#endif
  1309. X        default:
  1310. X        fprintf(stderr, "usage: pk2sfp [-D<debugoptions>] [-sS] file\n");
  1311. X        exit(1);
  1312. X    }
  1313. X    }
  1314. X
  1315. X    if (!silent) {
  1316. X    if (!symbol) {
  1317. X        for (i = 0; encNormal[i].e_name; i++) {
  1318. X        if (!encNormal[i].e_seq)
  1319. X            printf("Can't use %s in Normal font\n",
  1320. X            encNormal[i].e_name);
  1321. X#ifdef    NEVER
  1322. X        else if (strlen(encNormal[i].e_seq) != 1)
  1323. X            printf("Multi-char sequence (Normal fonts): %s\n",
  1324. X            encNormal[i].e_name);
  1325. X#endif
  1326. X        }
  1327. X    } else {
  1328. X        for (i = 0; encSymbol[i].e_name; i++) {
  1329. X        if (!encSymbol[i].e_seq)
  1330. X            printf("Can't use %s in Symbol font\n",
  1331. X            encSymbol[i].e_name);
  1332. X#ifdef    NEVER
  1333. X        else if (strlen(encSymbol[i].e_seq) != 1)
  1334. X            printf("Multi-char sequence (Symbol fonts): %s\n",
  1335. X            encSymbol[i].e_name);
  1336. X#endif
  1337. X        }
  1338. X    }
  1339. X    }
  1340. X
  1341. X
  1342. X    for(;argv[optind];optind++) {
  1343. X    register struct pkp *pk;
  1344. X    register struct pkc *pc;
  1345. X    register char *p;
  1346. X
  1347. X    p = strrchr(argv[optind], '/');
  1348. X    if (p)
  1349. X        strcpy(buf, p+1);
  1350. X    else
  1351. X        strcpy(buf, argv[optind]);
  1352. X
  1353. X    if (p = strchr(buf, '.'))
  1354. X        *p = '\0';
  1355. X    else
  1356. X        strcat(buf, ".WID");
  1357. X
  1358. X    if (!(fout = fopen(buf, "w"))) {
  1359. X        fprintf(stderr, "%s: cannot open %s\n", progname, buf);
  1360. X        exit(1);
  1361. X    }
  1362. X
  1363. X    if (allflag) {
  1364. X        fprintf(fout,
  1365. X        "Width: width of character at %d points at %dDPI\n",
  1366. X        UNITWIDTH, OUTRES);
  1367. X        fprintf(fout,
  1368. X        "Kern: 2 for ascenders, 1 for descenders or'd together\n");
  1369. X        fprintf(fout, "Code: Hexidecimal code\n");
  1370. X        fprintf(fout, "Code\tWidth\tKern\n");
  1371. X    } else {
  1372. X        fprintf(fout, "# %s\n", buf);
  1373. X        fprintf(fout, "# Generated by pk2ditwid\n");
  1374. X        fprintf(fout, "spacewidth 22\n");
  1375. X        fprintf(fout, "charset\n");
  1376. X    }
  1377. X
  1378. X    /* Read the PK file in-core */
  1379. X    pk = pk_read(argv[optind]);
  1380. X    if (allflag) {
  1381. X        for (pc = pk->pkp_chars; pc; pc = pc->pkc_next) {
  1382. X                /* get # pixels */
  1383. X        long widval = ((double) pc->pkc_dx / pow2(16)) *
  1384. X                /* normalize by actual resolution */
  1385. X                  ((double) OUTRES / pk->pkp_res) *
  1386. X                /* normalize to UNITWIDTH points */
  1387. X                  ((double) UNITWIDTH * pow2(20) / pk->pkp_ds) +
  1388. X                /* round ... */
  1389. X                  0.5;
  1390. X        int kern = ((pk->pkp_kh < pc->pkc_y_off) << 1) |
  1391. X               (pk->pkp_kl - 2 > pc->pkc_y_off - pc->pkc_height);
  1392. X               /* the "-2" is a fudge for teensy descenders */
  1393. X        fprintf(fout, "%02x\t%d\t%d\n", pc->pkc_char, widval, kern);
  1394. X        }
  1395. X        fclose(fout);
  1396. X        pk_destroy(pk);
  1397. X        continue;
  1398. X    }
  1399. X
  1400. X
  1401. X    /* Emit each character */
  1402. X    for (pc = pk->pkp_chars; pc; pc = pc->pkc_next) {
  1403. X        if (pc->pkc_char <= 0x20)
  1404. X        continue;
  1405. X        if (symbol)
  1406. X        et = encSymbol;
  1407. X        else
  1408. X        et = encNormal;
  1409. X        scanet(pk, pc, et);
  1410. X    }
  1411. X
  1412. X    for (et = (symbol ? encSymbol: encNormal); et->e_name; et++) {
  1413. X        if (et->e_seq && !et->e_wid) {
  1414. X        if (!silent)
  1415. X            printf("Didn't find width for %s\n", et->e_name);
  1416. X        } else {
  1417. X        register char *pp;
  1418. X        fprintf(fout, "%s\t%ld\t%d\t",
  1419. X            et->e_name, et->e_wid & 0x3f, (et->e_wid>>6)&0x3);
  1420. X        for (pp = et->e_seq; *pp; pp++)
  1421. X            fprintf(fout, "\\%03o", (*pp)&0xff);
  1422. X        fprintf(fout, "\n");
  1423. X        }
  1424. X    }
  1425. X
  1426. X    /* Clobber in-core PK */
  1427. X    pk_destroy(pk);
  1428. X    fclose(fout);
  1429. X
  1430. X    }
  1431. X    exit(0);
  1432. X}
  1433. X
  1434. Xscanet(p, pc, et)
  1435. Xregister struct pkp *p;
  1436. Xregister struct pkc *pc;
  1437. Xregister struct enctab *et; {
  1438. X    register char *pp;
  1439. X    int found = 0;
  1440. X    for (; et->e_name; et++) {
  1441. X    if (!et->e_seq)
  1442. X        continue;
  1443. X    for (pp = et->e_seq; *pp; pp++) {
  1444. X        if (((*pp)&0xff) == pc->pkc_char) {
  1445. X                /* get # pixels */
  1446. X        long widval = ((double) pc->pkc_dx / pow2(16)) *
  1447. X                /* normalize by actual resolution */
  1448. X                  ((double) OUTRES / p->pkp_res) *
  1449. X                /* normalize to UNITWIDTH points */
  1450. X                  ((double) UNITWIDTH * pow2(20) / p->pkp_ds) +
  1451. X                /* round ... */
  1452. X                  0.5;
  1453. X        int kern = ((p->pkp_kh < pc->pkc_y_off) << 1) |
  1454. X               (p->pkp_kl - 2 > pc->pkc_y_off - pc->pkc_height);
  1455. X               /* the "-2" is a fudge for teensy descenders */
  1456. X        found = 1;
  1457. X
  1458. X        /*printf("%s %s %03o\n", et->e_name, et->e_seq, pc->pkc_char);*/
  1459. X        if (et->e_wid) {    /* already seen */
  1460. X            int oldwid, oldkern;
  1461. X            oldwid = et->e_wid&0x3f;
  1462. X            oldkern = (et->e_wid>>6)&3;
  1463. X            kern |= oldkern;        /* this is correct */
  1464. X            /* This can be fooled.... */
  1465. X            if (*(pp+1) == 0x08 ||
  1466. X            (pp > et->e_seq && *(pp-1) == 0x08))
  1467. X            /* preceded or succeeded by BACKSPACE */
  1468. X            widval = max(widval, oldwid);
  1469. X            else
  1470. X            widval += oldwid;
  1471. X            if (widval > 0x3f) {    /* oh-oh! */
  1472. X            printf("Multi-sequence too wide! (%s)\n",
  1473. X                et->e_name);
  1474. X            widval = 0x3f;
  1475. X            }
  1476. X        }
  1477. X        et->e_wid = (widval | (kern << 6));
  1478. X        }
  1479. X    }
  1480. X    }
  1481. X    if (!found && !silent)
  1482. X    printf("Character \\%03o in font not used by troff\n",
  1483. X        pc->pkc_char);
  1484. X}
  1485. END_OF_FILE
  1486.   if test 5768 -ne `wc -c <'utils/pk2ditwid.c'`; then
  1487.     echo shar: \"'utils/pk2ditwid.c'\" unpacked with wrong size!
  1488.   fi
  1489.   # end of 'utils/pk2ditwid.c'
  1490. fi
  1491. if test -f 'utils/pktype.c' -a "${1}" != "-c" ; then 
  1492.   echo shar: Will not clobber existing file \"'utils/pktype.c'\"
  1493. else
  1494.   echo shar: Extracting \"'utils/pktype.c'\" \(5744 characters\)
  1495.   sed "s/^X//" >'utils/pktype.c' <<'END_OF_FILE'
  1496. X/*
  1497. X    Copyright 1985, 1986, 1987, 1988, 1989, 1990, 1991 Chris Lewis
  1498. X        All Rights Reserved
  1499. X
  1500. X    See the LICENSE file for a full description of restrictions under which
  1501. X    this software is provided.
  1502. X
  1503. X    Function:        prints header info from PK's and SFP's
  1504. X */
  1505. X
  1506. X#ifndef    lint
  1507. Xstatic char SCCSID[] =
  1508. X    "@(#)pk2sfp.c 2.3 Copyright 91/02/20 09:10:06 Chris Lewis";
  1509. X#endif
  1510. X#include "defs.h"
  1511. X#include "pk.h"
  1512. X
  1513. Xint firstchar = 0, lastchar = 0xff;
  1514. Xint verbose = 0;
  1515. Xchar *progname;
  1516. Xextern char *mustmalloc();
  1517. Xlong pks_malloc;
  1518. X
  1519. X/*    Dummied out for pk.c */
  1520. Xneedchar(a, b)
  1521. Xint a, b; {
  1522. X    return(1);
  1523. X}
  1524. X
  1525. Xmain(argc, argv)
  1526. Xint argc;
  1527. Xchar **argv; {
  1528. X    int c;
  1529. X    extern int optind, getopt();
  1530. X    extern char *optarg;
  1531. X    register struct pkp *p;
  1532. X    struct pkp *pk_read();
  1533. X
  1534. X    progname = argv[0];
  1535. X    while((c = getopt(argc, argv, "D:vf:l:")) != EOF)
  1536. X    switch(c) {
  1537. X        case 'D':
  1538. X#ifdef    DEBUG
  1539. X        setdebug(optarg, "diagnostics");
  1540. X        break;
  1541. X#else
  1542. X        fprintf(stderr, "%s: debug not supported recompile with DEBUG\n",
  1543. X            progname);
  1544. X        exit(1);
  1545. X#endif
  1546. X        case 'v':
  1547. X        verbose = 1;
  1548. X        break;
  1549. X        case 'f':
  1550. X        firstchar = *optarg;
  1551. X        break;
  1552. X        case 'l':
  1553. X        lastchar = *optarg;
  1554. X        break;
  1555. X        default:
  1556. X        fprintf(stderr, "Usage: %s [-f<ch>] [-l<ch>] pk_files\n", progname);
  1557. X        exit(1);
  1558. X    }
  1559. X#ifdef    DEBUG2
  1560. X    {
  1561. X    struct pkc p;
  1562. X    static int8 raster[] = {
  1563. X        0xd9, 0xe2, 0x97, 0x2b, 0x1e, 0x22,
  1564. X        0x93, 0x24, 0xe3, 0x97, 0x4e, 0x22,
  1565. X        0x93, 0x2c, 0x5e, 0x22, 0x97, 0xd9};
  1566. X
  1567. X    struct ras *r;
  1568. X
  1569. X    p.pkc_flag = 0x88;
  1570. X    p.pkc_dyn_f = 8;
  1571. X    p.pkc_pl = 0x1a;
  1572. X    p.pkc_char = 4;
  1573. X    p.pkc_tfm = 0x09c61c;
  1574. X    p.pkc_dx = 0x19;
  1575. X    p.pkc_dy = 0;
  1576. X    p.pkc_x_off = 0xFE;
  1577. X    p.pkc_y_off = 0;
  1578. X    p.pkc_height = 0x1d;
  1579. X    p.pkc_width = 0x14;
  1580. X    p.pkc_pkr = raster;
  1581. X    p.pkc_rlen = sizeof(raster);
  1582. X    r = pkrast(&p);
  1583. X    dumpr(r, p.pkc_height);
  1584. X    }
  1585. X#endif
  1586. X    for (; optind < argc; optind++) {
  1587. X    char *filebuf = mustmalloc(strlen(argv[optind]) + 10);
  1588. X    register char *cp;
  1589. X
  1590. X    cp = strrchr(argv[optind], '/');
  1591. X
  1592. X    if (cp)
  1593. X        strcpy(filebuf, cp+1);
  1594. X    else
  1595. X        strcpy(filebuf, argv[optind]);
  1596. X
  1597. X    strcat(filebuf, ".D");
  1598. X
  1599. X    if (diagFile)
  1600. X        fclose(diagFile);
  1601. X
  1602. X    if (!(diagFile = fopen(filebuf, "w"))) {
  1603. X        fprintf(stderr, "%s: cannot open filebuf\n");
  1604. X        exit(1);
  1605. X    }
  1606. X    p = pk_read(argv[optind]);
  1607. X    pk_dump(p, argv[optind]);
  1608. X    pk_destroy(p);
  1609. X    free(filebuf);
  1610. X    }
  1611. X    exit(0);
  1612. X}
  1613. X
  1614. Xpk_dump(p, file)
  1615. Xstruct pkp *p;
  1616. Xchar *file; {
  1617. X    struct pkc *pc;
  1618. X
  1619. X    fprintf(diagFile, "**********************************************\n");
  1620. X    fprintf(diagFile, "File %s:\n", file);
  1621. X    fprintf(diagFile, "  Font file type: %s\n",
  1622. X    p->pkp_flags&1 ? "PK" : "SFP");
  1623. X    fprintf(diagFile, "  Number of characters: %d\n", p->pkp_num);
  1624. X    fprintf(diagFile, "  Approximately %d bytes used\n", pks_malloc);
  1625. X    fprintf(diagFile, "  Design size: %ld, Native point size: %ld\n",
  1626. X    p->pkp_ds, p->pkp_ds / pow2(20));
  1627. X    fprintf(diagFile, "  Pointsize normalized to %d DPI: %ld\n",
  1628. X    OUTRES, p->pkp_npts);
  1629. X    fprintf(diagFile, "  Checksum: %ld\n", p->pkp_cs);
  1630. X    fprintf(diagFile, "  hppp: %ld, vppp: %ld\n", p->pkp_hppp, p->pkp_vppp);
  1631. X    fprintf(diagFile, "  hor. pixels/point: %f, ver. pixels/point: %f\n",
  1632. X    (double) p->pkp_hppp / pow2(16), (double) p->pkp_vppp / pow2(16));
  1633. X    fprintf(diagFile,
  1634. X    "  Hor. font resolution: %ld, Ver. font resolution: %ld\n",
  1635. X    p->pkp_res, (long) ((p->pkp_vppp * POINT / pow2(16)) + .5));
  1636. X    fprintf(diagFile,
  1637. X    "  Max y offset: %ld, Max descender: %ld, ", p->pkp_bmax, p->pkp_dmax);
  1638. X    fprintf(diagFile, "Max width: %ld, Max X offset: %ld\n",
  1639. X    p->pkp_wmax, p->pkp_xomax);
  1640. X    fprintf(diagFile,
  1641. X    "  Kern high: %ld, Kern low: %ld\n", p->pkp_kh, p->pkp_kl);
  1642. X    fprintf(diagFile,
  1643. X    "  SFP Info: symset: %d%c, style: %d, stroke: %d, typeface: %d\n",
  1644. X    (p->pkp_symset & 0x01e0) >> 5, (p->pkp_symset & 0x1f) + '@',
  1645. X    p->pkp_style, p->pkp_sw, p->pkp_typeface);
  1646. X
  1647. X    for (pc = p->pkp_chars; pc; pc = pc->pkc_next) {
  1648. X    register int i;
  1649. X    if (pc->pkc_char < firstchar || pc->pkc_char > lastchar)
  1650. X        continue;
  1651. X    fprintf(diagFile, "\nCharacter: %lx (%c), (0%03o), Packet length: %d\n",
  1652. X        pc->pkc_char, (char) (isprint(pc->pkc_char) ? pc->pkc_char : '?'),
  1653. X        pc->pkc_char, pc->pkc_pl);
  1654. X    fprintf(diagFile, "  Flag byte: %d\n", pc->pkc_flag);
  1655. X    fprintf(diagFile, "  Dynamic packing variable: %d\n", pc->pkc_dyn_f);
  1656. X    fprintf(diagFile, "  TFM width: %d, dx: %d, delta x: %d", pc->pkc_tfm,
  1657. X        pc->pkc_dx, pc->pkc_dx * 4 / pow2(16));
  1658. X    if (pc->pkc_dy)
  1659. X        fprintf(diagFile, " dy: %d\n", pc->pkc_dy);
  1660. X    else
  1661. X        putc('\n', diagFile);
  1662. X    fprintf(diagFile,
  1663. X        "  Height: %d, Width: %d, X-offset: %d, Y-offset: %d\n",
  1664. X        pc->pkc_height, pc->pkc_width, pc->pkc_x_off, pc->pkc_y_off);
  1665. X    if (pc->pkc_rlen) {
  1666. X        fprintf(diagFile,
  1667. X        "  Raster length: %d, width in pixels: %ld\n", pc->pkc_rlen,
  1668. X        pc->pkc_dx / pow2(16));
  1669. X        fprintf(diagFile, "  ");
  1670. X        for (i = 0; i < 32; i++)
  1671. X        if (i >= pc->pkc_rlen)
  1672. X            break;
  1673. X        else
  1674. X            fprintf(diagFile, "%02x", 0xff & pc->pkc_pkr[i]);
  1675. X        putc('\n', diagFile);
  1676. X    }
  1677. X
  1678. X    if (pc->pkc_sfpr)
  1679. X        fprintf(diagFile, "  SFP length: %d\n", pc->pkc_sfpr->ras_bytes);
  1680. X    if (p->pkp_flags&PK_PK) {
  1681. X        if (pc->pkc_dyn_f == 14)
  1682. X        fprintf(diagFile, "  Bit map character, ");
  1683. X        else
  1684. X        fprintf(diagFile, "  Packed character, ");
  1685. X        switch(pc->pkc_flag & 0x7) {
  1686. X        case 7:
  1687. X            fprintf(diagFile, "Long form\n");
  1688. X            break;
  1689. X        case 4: case 5: case 6:
  1690. X            fprintf(diagFile, "Extended short form\n");
  1691. X            break;
  1692. X        default:
  1693. X            fprintf(diagFile, "Short form\n");
  1694. X        }
  1695. X    }
  1696. X    if (verbose)
  1697. X        rasterdump(pc);
  1698. X    }
  1699. X}
  1700. X
  1701. Xrasterdump(pc)
  1702. Xstruct pkc *pc; {
  1703. X    struct ras *r;
  1704. X    register int x, y;
  1705. X    extern struct ras *pkrast();
  1706. X    r = pkrast(pc);
  1707. X    if (r) {
  1708. X    fprintf(diagFile, "Character image:\n");
  1709. X    dumpr(r, r->ras_height);
  1710. X    free(r->ras_raster);
  1711. X    free(r);
  1712. X    } else
  1713. X    fprintf(diagFile, "NULL character image\n");
  1714. X}
  1715. END_OF_FILE
  1716.   if test 5744 -ne `wc -c <'utils/pktype.c'`; then
  1717.     echo shar: \"'utils/pktype.c'\" unpacked with wrong size!
  1718.   fi
  1719.   # end of 'utils/pktype.c'
  1720. fi
  1721. if test -f 'widths/gfnttab.S' -a "${1}" != "-c" ; then 
  1722.   echo shar: Will not clobber existing file \"'widths/gfnttab.S'\"
  1723. else
  1724.   echo shar: Extracting \"'widths/gfnttab.S'\" \(3139 characters\)
  1725.   sed "s/^X//" >'widths/gfnttab.S' <<'END_OF_FILE'
  1726. X%%STARTSHELL%%
  1727. X#    Copyright 1985, 1986, 1987, 1988, 1989, 1990, 1991 Chris Lewis
  1728. X#        All Rights Reserved
  1729. X#
  1730. X#    See the LICENSE file for a full description of the restrictions
  1731. X#    under which this software is provided.
  1732. X#
  1733. X#@(#)gfnttab.sh 2.7 91/04/02
  1734. X#    Set this to something non-null in the Makefile if you need
  1735. X#    a.out.h/COFF headers on your width files, and the COFF/HEADERSIZE
  1736. X#    defines cause dit2catwid to generate width tables that
  1737. X#    troff screams about.
  1738. Xcompile=%%COMPILE%%
  1739. Xif [ "$1" = "-e" ]
  1740. Xthen
  1741. X    ext=-e
  1742. X    shift
  1743. Xfi
  1744. Xrc=1
  1745. Xdir=$1
  1746. Xinstall=$2
  1747. Xcurdir=`pwd`
  1748. Xfontdir=%%FONTDIR%%
  1749. Xtrap "echo GFNTTAB failed ; rm -f /tmp/S ; exit \$rc" 0 1 2 3 15
  1750. Xif [ -z "$dir" ]
  1751. Xthen
  1752. X    echo "Missing font directory argument"
  1753. X    exit
  1754. Xfi
  1755. Xecho "GFNTTAB: Processing font directory $dir"
  1756. Xif [ -n "$install" ]
  1757. Xthen
  1758. X    ffile=$curdir/$install.fonts.new
  1759. Xelse
  1760. X    ffile=`basename $dir | sed -e 's/^width\(.*\)$/\1/'`
  1761. X    ffile=$curdir/$ffile.fonts.new
  1762. Xfi
  1763. Xrm -f $ffile
  1764. Xif [ ! -d $dir ]
  1765. Xthen
  1766. X    echo "No $dir directory"
  1767. X    exit
  1768. Xfi
  1769. Xcd $dir
  1770. Xrm -f /tmp/S
  1771. Xif [ ! -r R ]
  1772. Xthen
  1773. X    echo "Creating Dummy R font width table"
  1774. X    touch R
  1775. Xfi
  1776. Xif [ -r S ]
  1777. Xthen
  1778. X    cp S /tmp/S
  1779. X    chmod 644 /tmp/S
  1780. X    for i in S1 S2 S3 S4 S5 S6 S7 S8 S9 ST SI
  1781. X    do
  1782. X    if [ -r $i ]
  1783. X    then
  1784. X        sed -e '1,/charset/d' $i >> /tmp/S
  1785. X    fi
  1786. X    done
  1787. Xelse
  1788. X    echo "WARNING: no symbol font!"
  1789. X    > /tmp/S
  1790. Xfi
  1791. XDESC=DESC
  1792. Xif [ -r $DESC ]
  1793. Xthen
  1794. X    res=`sed -n -e 's/^[     ]*res[     ][     ]*\([0-9][0-9]*\).*/\1/p' $DESC`
  1795. X    if [ -z "$res" ]
  1796. X    then
  1797. X    echo "WARNING: no 'res' command in DESC - assuming 300"
  1798. X    res="-r 300"
  1799. X    else
  1800. X    res="-r $res"
  1801. X    fi
  1802. X    unit=`sed -n -e 's/^[     ]*unitwidth[     ][     ]*\([0-9][0-9]*\).*/\1/p' $DESC`
  1803. X    if [ -n "$unit" ]
  1804. X    then
  1805. X    res="$res -u $unit"
  1806. X    else
  1807. X    echo "WARNING: no 'unitwidth' command in DESC - assuming 10"
  1808. X    res="$res -u 10"
  1809. X    fi
  1810. Xelse
  1811. X    echo "WARNING: no DESC file in $dir - assuming 'res 300 unitwidth 10'"
  1812. X    res="-r 300 -u 10"
  1813. Xfi
  1814. Xecho "Using $res parameters"
  1815. Xfor i in [A-Z]*
  1816. Xdo
  1817. X    case $i in
  1818. X    ??) ;;
  1819. X    ?) ;;
  1820. X    *) continue ;;
  1821. X    esac
  1822. X    trc=0
  1823. X    case $i in
  1824. X    S[0-n] | ST | SI )
  1825. X        ;;
  1826. X    *)
  1827. X        Cline=`sed -e '1q' $i | sed -e 's/^#[     ]*//'`
  1828. X        echo "$i    $Cline" >> $ffile
  1829. X        ;;
  1830. X    esac
  1831. X    case $i in
  1832. X    S)
  1833. X        args="-s R /tmp/S"
  1834. X        ;;
  1835. X    SU)
  1836. X        args="-s R $i"
  1837. X        ;;
  1838. X    S[0-9] | SI | ST )
  1839. X        continue
  1840. X        ;;
  1841. X    *)
  1842. X        args="/tmp/S $i"
  1843. X        ;;
  1844. X    esac
  1845. X    echo "GFNTTAB: processing font $i ($Cline)"
  1846. X    if [ -n "$compile" ]
  1847. X    then
  1848. X    $curdir/dit2catwid $ext $res -c $args ft${i}.c
  1849. X    if [ $? != 0 ]
  1850. X    then
  1851. X        trc=1
  1852. X    else
  1853. X        cc -c ft${i}.c
  1854. X        trc=$?
  1855. X        mv ft${i}.o ft${i}
  1856. X    fi
  1857. X    else
  1858. X    $curdir/dit2catwid $ext $res $args ft${i}
  1859. X    trc=$?
  1860. X    fi
  1861. X    chmod 644 ft${i} > /dev/null 2>&1
  1862. X    if [ $trc != 0 ]
  1863. X    then
  1864. X    rc=2
  1865. X    fi
  1866. Xdone
  1867. Xrm -f /tmp/S
  1868. Xif [ $rc -gt 1 ]
  1869. Xthen
  1870. X    exit
  1871. Xfi
  1872. Xif [ -s "$ffile" ]
  1873. Xthen
  1874. X    ed - $ffile <<\!
  1875. X0a
  1876. XDUM
  1877. XDUM
  1878. XDUM
  1879. XDUM
  1880. X.
  1881. Xg/^R    /m0
  1882. Xg/^I    /m1
  1883. Xg/^B    /m2
  1884. Xg/^S    /m3
  1885. X4a
  1886. XS2    BracketFont
  1887. X.
  1888. Xg/^DUM/d
  1889. Xw
  1890. Xq
  1891. X!
  1892. Xfi
  1893. Xif [ $? != 0 ]
  1894. Xthen
  1895. X    exit
  1896. Xfi
  1897. Xif [ -n "$install" ]
  1898. Xthen
  1899. X    if [ ! -d $fontdir/$install ]
  1900. X    then
  1901. X    mkdir $fontdir/$install
  1902. X    fi
  1903. X    mv ft* $fontdir/$install
  1904. X    if [ $? != 0 ]
  1905. X    then
  1906. X    exit
  1907. X    fi
  1908. Xfi
  1909. Xtrap '' 0
  1910. Xrc=0
  1911. Xexit 0
  1912. END_OF_FILE
  1913.   if test 3139 -ne `wc -c <'widths/gfnttab.S'`; then
  1914.     echo shar: \"'widths/gfnttab.S'\" unpacked with wrong size!
  1915.   fi
  1916.   # end of 'widths/gfnttab.S'
  1917. fi
  1918. echo shar: End of archive 14 \(of 19\).
  1919. cp /dev/null ark14isdone
  1920. MISSING=""
  1921. for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 ; do
  1922.     if test ! -f ark${I}isdone ; then
  1923.     MISSING="${MISSING} ${I}"
  1924.     fi
  1925. done
  1926. if test "${MISSING}" = "" ; then
  1927.     echo You have unpacked all 19 archives.
  1928.     echo "Read the README to get started with psroff installation"
  1929.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  1930. else
  1931.     echo You still must unpack the following archives:
  1932.     echo "        " ${MISSING}
  1933. fi
  1934. exit 0
  1935.  
  1936. exit 0 # Just in case...
  1937.